home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ptv3n5.zip / CALCNAME.SRC next >
Text File  |  1992-09-01  |  474b  |  18 lines

  1. FUNCTION CalcHelpName: PathStr;
  2. VAR
  3.   EXEName: PathStr;
  4.   Dir: DirStr;
  5.   Name: NameStr;
  6.   Ext: ExtStr;
  7. BEGIN
  8.   IF Lo(DosVersion) >= 3 Then
  9.     EXEName := ParamStr(0)
  10.   ELSE         { Replaced 'TVDEMO.EXE' with APPNAME. }
  11.     EXEName := FSearch(APPNAME, GetEnv('PATH'));
  12.   FSplit(EXEName, Dir, Name, Ext);
  13.   IF Dir[Length(Dir)] = '\' THEN 
  14.     Dec(Dir[0]);
  15.   { Changed from 'DEMOHELP.HLP' to APPNAME. }
  16.   CalcHelpName := FSearch(APPNAME + '.HLP', Dir);
  17. END;
  18.